<template>
	<view class="content page-body">
		<view class="row">
			<view class="nominal">
				昵称
			</view>
			<view class="input">
				<input placeholder="请设置昵称" type="text" v-model="name" />
			</view>
		</view>
		<!-- <view class="row" @click="chooseSex">
			<view class="nominal">
				性别
			</view>
			<view class="input">
				{{sex}}
			</view>
			<view class="icon xiangyou"></view>
		</view> -->
	</view>
</template>

<script>
	var that=this;
	export default {
		data() {
			return {
				name:"",
				sex:"男"
			};
		},
		onLoad(){
			that=this;
		},
		methods:{
			chooseSex(){
				let setArr=['男','女'];
				
				uni.showActionSheet({
					itemList:setArr,
					success:(res)=>{
						let index=res.tapIndex;
						that.sex=setArr[index]
					}
				})
			}
		},
		onHide(){
			
		},
		onUnload(){
			that=null;
		},
		onNavigationBarButtonTap(e){
			// 请求接口
			let username = this.name;
		}
	}
</script>

<style lang="scss">
.content{
		display: flex;
		flex-wrap: wrap;
		view{
			display: flex;
		}
		.row{
			width: 90%;
			margin: 0 5%;
			border-bottom: solid 1upx #eee;
			.nominal{
				width: 160rpx;
				height: 100upx;
				font-weight: 200;
				font-size: 30upx;
				align-items: center;
			}
			.input{
				width: 70%;
				padding: 20upx 0;
				align-items: center;
				font-size: 30upx;
				&.switch{
					justify-content: flex-end;
				}
				.textarea{
					margin: 20upx 0;
					min-height: 100upx;
				}
			}
			.xiangyou{
				padding-right: 20upx;
				font-size: 14px;
				line-height: 100rpx;
				color: #b5b5b5;
			}
		}
	}
</style>
